/*!\mainpage Documentation
 *
 * \section important IMPORTANT
 *
 * This project is under subversion revision control provided by Google.  It
 * can be checked out by `svn checkout
 * http://ssinvaders.googlecode.com/svn/trunk/ ssinvaders-read-only`
 *
 * \section inheritance Interitance
 *
 * All classes inherit from QWidget or a subclass of QWidget.  This was done
 * because Qt will automatically handle drawing the objects at the correct
 * location on its parent internally.
 *
 * \section animation Animation
 *
 * All animations were storred in the GIF file format.  This file format was
 * used because they are easy to create with Gimp and the QMovie class can
 * read from them.  The QMovie class provided a very convient way of handling
 * animations, no class was needed to load all frames and switch between them.
 * The speed of the animation was handled using QTimers.  The timeout signal
 * was attached to the frameAdvance slot of the QMovie it controls.  This also
 * provided a convient way to move the animations on the main window as they
 * advanced their frames.  This was used for the Invaders as well as the 
 * InvaderBullets.
 *
 * \section changes Improvements To The Specification
 *
 * I decided to make a couple of changes to that of the specification of
 * Space Invaders.  I made these changes because I am a free thinking
 * individual and came to the conclusion that the end product was actually
 * better.
 *
 * The first change I made was the make the Invaders worth different point
 * values.  Since each Invader is a different size the smaller ones are harder
 * to hit and thus you should be fairly rewarded for your effort.  The largest
 * Invader is worth 10 pts. the middle sized Invader is worth 20 pts. and the
 * smallest Invader is worth 30 pts.  The mystery Invader is still worth 200
 * pts.
 *
 * The next change I made was when all Invaders are eliminated the game does
 * not end.  Instead the Invaders are reset starting at a lower position than
 * before.  Having a game that ends when all invader are destroyed is pretty
 * boring.  If the original game was like that then it wouldn't hold a world
 * record.  Also I you think really hard about it there would be a theoretical
 * absolute maximum high score which you could achieve if the game ended after
 * killing all of the Invaders once.  And that is no fun now matter how you
 * look at it.
 *
 * The last change to the game, which I don't think is a change at all, is the
 * in game menu.  Instead of using a boring, drab menubar at the top of the
 * window I made a menu which you gain access to by pressing the ESC key.  If
 * you take the literal meaning of the program functionality you have access to
 * all of the listed functionality at any time during the game provided you
 * press the ESC key.  If one wishes to poke at the fact that you have to press
 * the ESC key and you don't really have access at all times I would argue that
 * pressing the ESC key is equivalent to moving your hand to your mouse and
 * clicking on a traditional menu located at the top of the screen.  Plus a
 * menubar at the top of the screen would mess with the feng shui of the game
 * and we wouldn't want that now would we?
 *
 * \section bonus Bonus Implemented
 *
 * The "Mystery Ship" will appear at the top of the screen at random times.
 *
 * Four Bunkers each consisting of 10 tiles and each tile can withstand 4 shots
 * was implemented
 *
 * There is a rudamentry AI for the "Attract Mode".  The AI does not dodge
 * incoming invader bullets but it does shoot at the leading column of
 * invaders.  The leading column is the column closest to the side which the
 * army is currently moving towards.  The tank will not shoot if its bullet
 * would impact a bunker.  The tank also correctly calculates the distance that
 * it needs to shoot in front of an invader to hit it.  When all invaders in a
 * column is eliminated it will shoot one stray shot while it moves to the next
 * column.  I was going to implement a path planning algorithm to avoid the
 * invader bullets but the time necessary was not worth the effort due to other
 * class work.
 *
 */

#include <QtGui>

#include <iostream>
#include <time.h>

#include "invader_window.h"
#include "invader_font.h"

int main (int argc, char **argv)
{
  qsrand (time(0));
  QApplication app (argc, argv);
  InvaderWindow window;
  window.show ();
  return app.exec ();
}
